<div class="wrapper wrapper-content">
    <div class="container">
        <form class="form-horizontal" name="companyForm" ng-submit="vm.submitForm(companyForm.$valid)" novalidate>
            <div class="ibox">
                <!-- <div class="ibox-title">
                    <h5>赛事机构注册</h5>
                </div> -->
                <div class="ibox-content">
                    <div class="form-group has-feedback" ng-class="{'has-success': companyForm.companyName.$valid, 'has-error': companyForm.companyName.$invalid && !companyForm.companyName.$pristine}">
                    	<label class="col-lg-4 control-label">机构名称 <b class="text-danger">*</b></label>
                        <div class="col-lg-4">
                        	<input type="text" name="companyName" class="form-control" placeholder="请输入机构名称" ng-model="vm.company.company_name" ng-minlength="2" ng-maxlength="20" required>
                            <span class="glyphicon form-control-feedback" ng-class="{'glyphicon-ok': companyForm.companyName.$dirty && companyForm.companyName.$valid, 'glyphicon-remove': companyForm.companyName.$dirty && companyForm.companyName.$invalid}" ng-show="companyForm.companyName.$dirty"></span>
                            <div class="m-t-xs" ng-show="!companyForm.companyName.$pristine" ng-messages="companyForm.companyName.$error" ng-messages-multiple>
                                <div ng-messages-include="{{vm.textHtml}}"></div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group has-feedback" ng-class="{'has-success': companyForm.companyCity.$valid, 'has-error': companyForm.companyCity.$invalid && !companyForm.companyCity.$pristine}">
                    	<label class="col-lg-4 control-label">所在城市</label>
                        <div class="col-lg-4">
                        	<input type="text" name="companyCity" class="form-control" placeholder="请输入所在城市" ng-model="vm.company.company_city" ng-minlength="2" ng-maxlength="20">
                            <span class="glyphicon form-control-feedback" ng-class="{'glyphicon-ok': companyForm.companyCity.$dirty && companyForm.companyCity.$valid, 'glyphicon-remove': companyForm.companyCity.$dirty && companyForm.companyCity.$invalid}" ng-show="companyForm.companyCity.$dirty"></span>
                            <div class="m-t-xs" ng-show="!companyForm.companyCity.$pristine" ng-messages="companyForm.companyCity.$error" ng-messages-multiple>
                                <div ng-messages-include="{{vm.textHtml}}"></div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group has-feedback" ng-class="{'has-success': companyForm.companyNum.$valid, 'has-error': companyForm.companyNum.$invalid && !companyForm.companyNum.$pristine}">
                    	<label class="col-lg-4 control-label">每年赛事场次</label>
                        <div class="col-lg-4">	
                        	<div class="row">
                        		<div class="col-lg-12">
                        			<input type="text" name="companyNum" class="form-control" placeholder="请选择每年赛事场次" ng-model="vm.company.company_num" disabled>
                        		</div>
                            </div>
                            <div class="row">
                        		<div class="col-lg-12">
                        			<label class="radio">
			                    		<input icheck type="radio" name="radioNum" value="0" ng-model="vm.company.radio_num"> 3场以内
			                    	</label>
			    					<label class="radio">
			    						<input icheck type="radio" name="radioNum" value="1" ng-model="vm.company.radio_num"> 3-10场
			    					</label>
			    					<label class="radio">
			    						<input icheck type="radio" name="radioNum" value="2" ng-model="vm.company.radio_num"> 10场以上
			    					</label>
                        		</div>
                        	</div>
                        </div>
                    </div>
                    <div class="form-group has-feedback" ng-class="{'has-success': companyForm.companyScale.$valid, 'has-error': companyForm.companyScale.$invalid && !companyForm.companyScale.$pristine}">
                    	<label class="col-lg-4 control-label">主要赛事规模</label>
                        <div class="col-lg-4">
                            <div class="row" ng-if="!vm.is_admin">
                                <div class="col-lg-12">
                                    <label class="radio">
                                        主要赛事规模由系统管理员与机构管理员协商后，系统管理员填写。
                                    </label>

                                </div>
                            </div>
                            <div class="row" ng-if="!vm.is_admin">
                                <div class="col-lg-12">
                                    <input type="text" name="companyScale" class="form-control" placeholder="" ng-model="vm.company.company_scale" disabled>
                                </div>
                            </div>
                        	<div class="row" ng-if="vm.is_admin">
                        		<div class="col-lg-12">
                        			<input type="text" name="companyScale" class="form-control" placeholder="请选择主要赛事规模" ng-model="vm.company.company_scale" disabled>
                        		</div>
                            </div>
                            <div class="row" ng-if="vm.is_admin">
                        		<div class="col-lg-12">
                        			<label class="radio">
			                    		<input icheck type="radio" name="radioScale" value="0" ng-model="vm.company.radio_scale"> 500人以下
			                    	</label>
			    					<label class="radio">
			    						<input icheck type="radio" name="radioScale" value="1" ng-model="vm.company.radio_scale"> 500-1000人
			    					</label>
			    					<label class="radio">
			    						<input icheck type="radio" name="radioScale" value="2" ng-model="vm.company.radio_scale"> 1000-3000人
			    					</label>
			    					<label class="radio">
			    						<input icheck type="radio" name="radioScale" value="3" ng-model="vm.company.radio_scale"> 3000人以上
			    					</label>
                        		</div>
                        	</div>
                        </div>
                    </div>
                    <div class="form-group has-feedback" ng-class="{'has-success': companyForm.companyType.$valid, 'has-error': companyForm.companyType.$invalid && !companyForm.companyType.$pristine}">
                    	<label class="col-lg-4 control-label">机构角色 <b class="text-danger">*</b></label>
                        <div class="col-lg-4">
                        	<select class="form-control" name="companyType" ng-model="vm.company.company_type" ng-options="x.id as x.name for x in vm.company_types" required>  
                            	<option value="">请选择机构角色</option>  
                        	</select>
                        </div>
                    </div>
                    <div class="form-group has-feedback" ng-class="{'has-success': companyForm.companyPhone.$valid, 'has-error': companyForm.companyPhone.$invalid && !companyForm.companyPhone.$pristine}">
                    	<label class="col-lg-4 control-label">联系方式 <b class="text-danger">*</b></label>
                        <div class="col-lg-4">
                			<input type="text" name="companyPhone" class="form-control" placeholder="请输入手机号码" ng-model="vm.company.company_phone" ng-pattern="/^\d{11}$/" minlength="11" ng-maxlength="11" required>
                            <span class="glyphicon form-control-feedback" ng-class="{'glyphicon-ok': companyForm.companyPhone.$dirty && companyForm.companyPhone.$valid, 'glyphicon-remove': companyForm.companyPhone.$dirty && companyForm.companyPhone.$invalid}" ng-show="companyForm.companyPhone.$dirty"></span>
                            <div class="m-t-xs" ng-show="!companyForm.companyPhone.$pristine" ng-messages="companyForm.companyPhone.$error" ng-messages-multiple>
                                <div ng-messages-include="{{vm.textHtml}}"></div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group has-feedback" ng-class="{'has-success': companyForm.companyEmail.$valid, 'has-error': companyForm.companyEmail.$invalid && !companyForm.companyEmail.$pristine}">
                        <label class="col-lg-4 control-label sr-only">联系方式</label>
                        <div class="col-lg-4">
                            <input type="email" name="companyEmail" class="form-control" placeholder="请输入邮箱地址" ng-model="vm.company.company_email" ng-pattern="/^[_a-zA-Z0-9\-\.]+@([\-_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/">
                            <span class="glyphicon form-control-feedback" ng-class="{'glyphicon-ok': companyForm.companyEmail.$dirty && companyForm.companyEmail.$valid, 'glyphicon-remove': companyForm.companyEmail.$dirty && companyForm.companyEmail.$invalid}" ng-show="companyForm.companyEmail.$dirty"></span>
                            <div class="m-t-xs" ng-show="!companyForm.companyEmail.$pristine" ng-messages="companyForm.companyEmail.$error" ng-messages-multiple>
                                <div ng-messages-include="{{vm.textHtml}}"></div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-4 control-label">赛事机构LOGO</label>
                        <div class="col-lg-4">
                            <div class="upload-logo">
                                <img ng-src="{{vm.imageSrc}}" id="act_image" ng-show="vm.imageSrc">
                                <input class="input-file" type="file" name="image" file-model="vm.myFile" file-fn="vm.getFile()">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-offset-4 col-lg-4">
                            <button type="button" class="btn btn-sm btn-default" ui-sref="dashboard.companylist"><i class="fa fa-times"></i>取消</button>
                            <button type="submit" class="btn btn-sm btn-primary" ng-disabled="hide"><i class="fa fa-save"></i>提交</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<div ng-include="footerHtml"></div>